package com.twu.biblioteca.entity;

import com.twu.biblioteca.util.Formatter;

/**
 * Created with IntelliJ IDEA.
 * User: deva
 * Date: 10/1/13
 * Time: 10:18 AM
 * To change this template use File | Settings | File Templates.
 */
public class Movie {

    public Movie(String name, short year, String director, Rating rating)
    {
        this.name = name;
        this.year = year;
        this.director = director;
        this.rating = rating;
    }

    private  String getName() {
        return name;
    }

    private short getYear() {
        return year;
    }

    private String getDirector() {
        return director;
    }


    @Override
    public String toString() {
        char tab = '\t';

        return Formatter.formatStringWith30Length(getName()) + tab
                + getYear() + tab + Formatter.formatStringWith30Length(getDirector()) + tab + rating.toString();
    }

    private String name;
    private Short year;
    private String director;
    private Rating rating;
}
